import ajax from './ajax'

const api = {
    reqRegiter: (user) => ajax('/users/register', user, 'PSOT'),
    reqLogin: (user) => ajax('/users/login', user, 'PSOT'),
    reqUpdateUser: (user) => ajax('/users/update', user, 'PSOT'),
    reqUser: (user_id) => ajax('/users/user',user_id ,'POST'),
    reqUserList: (type) => ajax('/users/list', {type}),
    reqUserOne: (id) => ajax('/users/userOne', id ,'POST'),
    // 消息类
    reqChatMsgList: (user_id) => ajax('/chat/msglist',user_id ,'POST'),
    reqReadChatMsg: (from,userid) => ajax('/chat/readmsg',{from ,userid} ,'POST')
}
export default api